home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Hyper / Ss-Sz / Summarizer.cpt / Summarizer 1.3 / stack.txt < prev   
Encoding:
Text File  |  1987-12-25  |  7.7 KB  |  261 lines

  1. -- stack: in.3
  2. -- format: 8 (HyperCard 1)
  3. -- flags: 0x0 (none)
  4. -- protect password hash: 0
  5. -- maximum user level: 5 (scripting)
  6. -- window: Rect(x1=0, y1=0, x2=0, y2=0)
  7. -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
  8. -- card dimensions: w=0 h=0
  9. -- scroll: x=0 y=0
  10. -- background count: 4
  11. -- first background id: 2737
  12. -- card count: 12
  13. -- first card id: 3853
  14. -- list block id: 4555
  15. -- print block id: 4650
  16. -- font table block id: 0
  17. -- style table block id: 0
  18. -- free block count: 0
  19. -- free size: 0 bytes
  20. -- total size: 46752 bytes
  21. -- stack block size: 8192 bytes
  22. -- created by hypercard version: 0x00000000
  23. -- compacted by hypercard version: 0x00000000
  24. -- modified by hypercard version: 0x00000000
  25. -- opened by hypercard version: 0x00000000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x8000000008000000
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0x8888222288882222
  30. -- patterns[4]: 0x88AA22AA88AA22AA
  31. -- patterns[5]: 0xCCAA33AACCAA33AA
  32. -- patterns[6]: 0xEEAABBAAEEAABBAA
  33. -- patterns[7]: 0xEEBBBBEEEEBBBBEE
  34. -- patterns[8]: 0xFFBBFFEEFFBBFFEE
  35. -- patterns[9]: 0xFFBBFFFFFFBBFFFF
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0x8822552288225522
  44. -- patterns[18]: 0x8855225588552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0x8000000000000000
  47. -- patterns[21]: 0xAA55AA55AA55AA55
  48. -- patterns[22]: 0x038448300C020101
  49. -- patterns[23]: 0x8244394482010101
  50. -- patterns[24]: 0x8814224188412214
  51. -- patterns[25]: 0x8080413E080814E3
  52. -- patterns[26]: 0x22048C7422179810
  53. -- patterns[27]: 0xBE808808EB088880
  54. -- patterns[28]: 0x25C8328964244C92
  55. -- patterns[29]: 0xA29C41BE2AC914EB
  56. -- patterns[30]: 0x40A00000040A0000
  57. -- patterns[31]: 0x8040200002040800
  58. -- patterns[32]: 0xAA00800088008000
  59. -- patterns[33]: 0xFF80808080808080
  60. -- patterns[34]: 0x081C22C180010204
  61. -- patterns[35]: 0xFF808080FF080808
  62. -- patterns[36]: 0xF87422478F172271
  63. -- patterns[37]: 0xBF00BFBFB0B0B0B0
  64. -- patterns[38]: 0xFF7FBE5DA2418000
  65. -- patterns[39]: 0xFAF5FAF5A050A050
  66. -- checksum: 0x0
  67. ----- HyperTalk script -----
  68. on openstack
  69.   set userlevel to 5
  70.   hide menubar
  71.   get short name of stack
  72.   put it into card field "stkname"
  73.   wait 2 seconds
  74.   go to card "ChptLstCrd"
  75. end openstack
  76.  
  77. on domenu
  78.   global ptype
  79.   put the param of 1 into ptype
  80.   if ptype contains "paste" then
  81.     if ptype is "paste card" then
  82.       get the short name of the target
  83.       if it is "Add topics" or it is "Contents" or it is "Insert" then
  84.         pass domenu
  85.       else  -- pasting but not card
  86.         beep 1
  87.         put "Make menus first, THEN copy text/graphics, not vice versa!"
  88.         answer "You are trying to paste a card!..." with "OK"
  89.         answer "Only Summarizer may paste cards!" with "OK"
  90.         put empty into msg
  91.         hide msg
  92.         exit domenu
  93.       end if
  94.     end if
  95.     answer "About to" && ptype && "from clipboard" with "Cancel" or "OK"
  96.     if it is "Cancel" then exit domenu
  97.   end if
  98.   if ptype contains "cut" or ptype contains "copy" then
  99.     if ptype is "cut picture" or ptype is "copy picture" then
  100.       put "Make menus first, THEN copy text/graphics, not vice versa!"
  101.       answer "Have you made menus for this graphic yet?" with "No" or "Yes"
  102.       if it is "No" then
  103.         hide msg
  104.         exit domenu
  105.       end if
  106.     end if
  107.     if ptype is "cut " then
  108.       beep 1
  109.       answer "There must be graphics to cut!" with "OK"
  110.       exit domenu
  111.     end if
  112.   end if
  113.   hide msg
  114.   pass domenu
  115. end domenu
  116.  
  117. on MakePage
  118.   put empty into NwCrd
  119.   put field "HeaderFld" into StrtCrdHeader
  120.   put short name of next card into RCard
  121.   put short name of this card into StrtCrd
  122.   set lockscreen to "true"
  123.   if RCard is "@" then
  124.     domenu "new card"
  125.     set name of this card to "@"
  126.     if StrtCrd is "@" then
  127.       put StrtCrdHeader into field "HeaderFld"
  128.     else
  129.       put "‚Ķ" && StrtCrdHeader && "Cont." into field "HeaderFld"
  130.     end if
  131.     put "true" into NwCrd
  132.   else
  133.     put "false" into NwCrd
  134.   end if
  135.   domenu "new button"
  136.   set name of button "new button" to "NxtPg"
  137.   set showname of button "NxtPg" to false
  138.   set rect of button "NxtPg" to 460, 0, 480, 17
  139.   set icon of button "NxtPg" to "sml Next Arrow"
  140.   set loc of button "NxtPg" to 460,8
  141.   set style of button "NxtPg" to opaque
  142.   set script of button "NxtPg" to "On mouseup" & return & "go to next card" & return & "if the number of card fields is 1 then" & return & "get rect of card field" && quote & "txtfld" & quote & return & "delete item 4 of it" & return & "delete item 3 of it" & return & "click at it" & return & "end if" & return & "end mouseup"
  143.   if not NwCrd then
  144.     domenu "new card"
  145.     set name of this card to "@"
  146.     if StrtCrd is "@" then
  147.       put StrtCrdHeader into field "HeaderFld"
  148.     else
  149.       put "‚Ķ" && StrtCrdHeader && "Cont." into field "HeaderFld"
  150.     end if
  151.   end if
  152.   domenu "new button"
  153.   set name of button "new button" to "PrvPg"
  154.   set showname of button "PrvPg" to false
  155.   set rect of button "PrvPg" to 481, 0, 501, 17
  156.   set icon of button "PrvPg" to "sml Prev Arrow"
  157.   set loc of button "PrvPg" to 481,8
  158.   set style of button "PrvPg" to opaque
  159.   set script of button "PrvPg" to "On mouseup" & return & "go to prev card" & return & "if the number of card fields is 1 then" & return & "get rect of card field" && quote & "txtfld" & quote & return & "delete item 4 of it" & return & "delete item 3 of it" & return & "click at it" & return & "end if" & return &"end mouseup"
  160.   choose browse tool
  161. end MakePage
  162.  
  163. on MakeField
  164.   global WindType
  165.   domenu "New field"
  166.   set name of card field "" to "TxtFld"
  167.   set rect of card field "TxtFld" to 19,18,512,342
  168.   if WindType is "Scroll"
  169.   then set Style of card field "TxtFld" to Scrolling
  170.   if WindType is "Reg Text"
  171.   then set Style of card field "Txtfld" to transparent
  172.   set textFont of card field "TxtFld" to geneva
  173.   set TextSize of card field "Txtfld" to 9
  174.   set locktext of card field "Txtfld" to false
  175.   set wideMargins of card field "Txtfld" to true
  176.   put IBeam("TxtFld") into dummy
  177. end MakeField
  178.  
  179. on SendTxtToFld
  180.   global Xit, fileName
  181.   put False into Xit
  182.   answer "Stop entry of text..." with "at TAB" or "at RETURN" or "after ? chars"
  183.   put it into Delimiter
  184.  
  185.   if delimiter is "after ? chars" then
  186.     beep 1
  187.     put "30,000 chars max for scroll/reg field!  Try 400 for Reg."
  188.     show msg
  189.     ask "Enter number of characters to read"
  190.     if it is empty then
  191.       hide msg
  192.       put true into Xit
  193.       exit SendTxtToFld
  194.     end if
  195.     put it into NumWds
  196.     hide msg
  197.     read from file fileName for NumWds
  198.   end if
  199.  
  200.   if delimiter is "at TAB"
  201.   then read from file fileName until Tab
  202.   if delimiter is "at RETURN"
  203.   then read from file fileName until Return
  204.  
  205.   if it is empty then
  206.     beep 1
  207.     put "End of file!"
  208.     show msg
  209.     wait 2 seconds
  210.     hide msg
  211.     put true into Xit
  212.     exit SendTxtToFld
  213.   end if
  214.  
  215.   put it after card field "TxtFld"
  216. end SendTxtToFld
  217.  
  218.  
  219. function Bs10To26 Base10
  220. put 9999 into quotient
  221. put empty into Base26
  222. repeat while quotient is not 0
  223.   put Base10 div 26 into quotient
  224.   put NumToChar of (Base10 mod 26 + 65) before Base26
  225.   put quotient into Base10
  226. end repeat
  227. return Base26
  228. end Bs10To26
  229.  
  230. function PasteAtPrev template
  231. go to card template
  232. domenu "copy card"
  233. go to prev card
  234. domenu "paste card"
  235. end PasteAtPrev
  236.  
  237. function IBeam CrdFld
  238. choose browse tool
  239. set lockscreen to false
  240. get rect of card field CrdFld
  241. delete item 4 of it
  242. delete item 3 of it
  243. click at it
  244. end IBeam
  245.  
  246. function DelCards ChptNam
  247. go to card ChptNam
  248. put number of lines in field "TpcLstFld" into LstNum
  249. domenu "delete card"
  250. go to card ChptNam & 1
  251. repeat while short name of this card is not ChptNam & LstNum
  252.   domenu "delete card"
  253. end repeat
  254. domenu "delete card"
  255. repeat while short name of this card is "@"
  256.   domenu "delete card"
  257. end repeat
  258. go to card "ChptLstCrd"
  259. end DelCards
  260.  
  261.